home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 June: Reference Library / Dev.CD Jun 00 RL Disk 1.toast / pc / technical documentation / develop / develop issue 28 / develop issue 28 code / merge tools / nextmerge.make < prev    next >
Encoding:
Text File  |  1994-06-29  |  2.9 KB  |  94 lines

  1. # NeXT Makefile for the Eclectus merge utility
  2. # Copyright (C) 1992 Eclectus (D. John Anderson, Alan B. Harper).
  3.  
  4. # This file is part of the Eclectus integration utilities.
  5.  
  6. # Eclectus integration utilities are free software; you can redistribute
  7. # it and/or modify it under the terms of the GNU General Public License
  8. # as published by the Free Software Foundation; either version 1, or
  9. # (at your option) any later version.
  10.  
  11. # Eclectus integration utilities is distributed in the hope that it
  12. # will be useful, but WITHOUT ANY WARRANTY; without even the implied
  13. # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. # See the GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with the Eclectus integration utilities; see the file COPYING.
  18. # If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge,
  19. # MA 02139, USA.
  20.  
  21. # We can't use -pedantic because the braindamaged NeXT includes aren't ANSI compatible.
  22.  
  23. DEBUG_C_OPTIONS = -g -I$(DERIVED_DIR) -I$(OBERISH_DIR) -DDF_DEBUG -Wall -ansi\
  24.     -pedantic -DDF_MACHINE_NEXT -DDF_COMPILER_GNU -D_NEXT_SOURCE
  25.  
  26. C_OPTIONS = -O -I$(DERIVED_DIR) -fomit-frame-pointer -ansi -DDF_MACHINE_NEXT -DDF_COMPILER_GNU\
  27.  -D_NEXT_SOURCE
  28.  
  29. #VPATH specifies where to look for dates on object files
  30. VPATH = $(DERIVED_DIR):
  31.  
  32. H_FILES = \
  33.     diff.h
  34.  
  35. MERGE_C_FILES =\
  36.     Merge.c \
  37.     analyze.c \
  38.     io.c \
  39.     util.c
  40.  
  41. LOADLIBS = -lsys_s
  42.  
  43. BIN_DIR = ../../ECTools
  44. DERIVED_DIR = DerivedMerge.i
  45. OBERISH_DIR = ../Oberish
  46.  
  47. MERGE_OBJS = $(MERGE_C_FILES:.c=.o) $(DEBUG_OBJS)
  48.  
  49. All: Merge
  50.  
  51. Merge: $(DERIVED_DIR) $(DERIVED_DIR)/tags $(MERGE_OBJS)
  52.     $(CC) $(C_OPTIONS) -o $(DERIVED_DIR)/$@ $(MERGE_OBJS) $(LOADLIBS)
  53.  
  54. clean:
  55.     -/bin/rm -rf $(DERIVED_DIR)
  56.  
  57. debug:
  58.     $(MAKE) -f NextMerge.make "C_OPTIONS = $(DEBUG_C_OPTIONS)" "DEBUG_OBJS = DebugMalloc.o" All
  59.  
  60. install: $(BIN_DIR)
  61.     install -m 755 $(DERIVED_DIR)/Merge $(BIN_DIR)/Merge
  62.  
  63. testDebug:
  64.     $(DERIVED_DIR)/Merge -x -X testfile0 testfile1 testfile2 testfile3 testfile4 $(DERIVED_DIR)/testfile.out
  65.     diff $(DERIVED_DIR)/!testfile.out testfile.merge
  66.     rm -rf $(DERIVED_DIR)/testd.out
  67.     $(DERIVED_DIR)/Merge -x -X testd0 testd1 testd2 testd3 testd4 $(DERIVED_DIR)/testd.out
  68.     Difference $(DERIVED_DIR)/testd.out testd.next.merge >$(DERIVED_DIR)/testd.check
  69.  
  70. test:
  71.     $(DERIVED_DIR)/Merge testfile0 testfile1 testfile2 testfile3 testfile4 $(DERIVED_DIR)/testfile.out
  72.     diff $(DERIVED_DIR)/!testfile.out testfile.merge
  73.     rm -rf $(DERIVED_DIR)/testd.out
  74.     $(DERIVED_DIR)/Merge testd0 testd1 testd2 testd3 testd4 $(DERIVED_DIR)/testd.out
  75.     Difference $(DERIVED_DIR)/testd.out testd.next.merge >$(DERIVED_DIR)/testd.check
  76.  
  77. $(BIN_DIR):
  78.     mkdirs -m 755 $@
  79.  
  80. .c.o:
  81.     $(CC) $(C_OPTIONS) -c $*.c -o $(DERIVED_DIR)/$*.o
  82.  
  83. $(DERIVED_DIR)/tags:
  84.     ctags -o $(DERIVED_DIR)/tags $(MERGE_C_FILES) $(H_FILES)
  85.  
  86. DebugMalloc.o: ../Oberish/DebugMalloc.c
  87.     $(CC) $(C_OPTIONS) -c ../Oberish/DebugMalloc.c -o $(DERIVED_DIR)/DebugMalloc.o
  88.  
  89. $(DERIVED_DIR):
  90.     mkdirs -m 755 $@
  91.  
  92.  
  93.  
  94.